<div class="Item hr">
    <span class="fr">现有榜单<b>{$rows_count}</b>个</span>
    <div class="current">榜单列表</div>
</div>
<form>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tab">
        <thead>
            <tr>
                <td>ID</td>
                <td>榜单名称</td>
                <td>榜单小说数量</td>
                <td>排序</td>
                <td>操作</td>
            </tr>
        </thead>
        <tbody>
            <volist name="list" id="val">
            <tr align="center">
                <td>{$val['id']}</td>
                <td>{$val['rank_name']}</td>
                <td>{$val['rank_novel_number']}</td>
                <td>{$val['order']}</td>
                <td>
                    [ <a href="{:U('Novel/index', array('rank_id' => $val['id']))}">榜单小说</a> ] ||
                    [ <a href="{:U('Rank/edit', array('id' => $val['id']))}">详情</a> ]
                    <php>if($_SESSION['current_account']['is_super'] == 1){</php>
                    || [ <a onclick="del({$val.id})" href="javascript:void(0)">删除</a> ]
                    <php>}</php>
                </td>
            </tr>
            </volist>
        </tbody>
    </table>
</form>

<div class="page">
    {$page}
</div>

<script type="text/javascript" src="/Public/javascripts/admin/layer/layer.js"></script>
<script type="text/javascript">
    function del(id){
        layer.confirm('确定要删除此榜单?', {icon: 3, title:'提示'}, function( )
        {
            $.post(
                "{:U('Rank/del')}",{id:id},function(json){
                    if(json.code == 0){
                        layer.msg(json.msg,{icon:1,time: 1000},function(){location.reload()});
                    }
                },'json'
            )
            layer.close();//关闭弹窗
        });
    }
</script>